package com.spring.fisher;

import com.spring.fisher.druidConfig.DruidConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

@SpringBootApplication(scanBasePackages = "com.spring.fisher")
@MapperScan("com.spring.fisher.dao")//该注解会扫描 dao 包下的接口，把接口生成代理对象并加入到 spring 容器中
@EnableConfigurationProperties(DruidConfig.class)//手动开启druid数据源
public class SpringbootDemo {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootDemo.class, args);
        printBanner();
    }

    private static void printBanner() {
        // ASCII 艺术或项目标志输出
        System.out.println("  _____ _______       _____ _______    _____ _    _  _____ _____ ______  _____ _____ ");
        System.out.println(" / ____|__   __|/\\   |  __ \\__   __|  / ____| |  | |/ ____/ ____|  ____|/ ____/ ____|");
        System.out.println("| (___    | |  /  \\  | |__) | | |    | (___ | |  | | |   | |    | |__  | (___| (___  ");
        System.out.println(" \\___ \\   | | / /\\ \\ |  _  /  | |     \\___ \\| |  | | |   | |    |  __|  \\___ \\\\___ \\ ");
        System.out.println(" ____) |  | |/ ____ \\| | \\ \\  | |     ____) | |__| | |___| |____| |____ ____) |___) |");
        System.out.println("|_____/   |_/_/    \\_\\_|  \\_\\ |_|    |_____/ \\____/ \\_____\\_____|______|_____/_____/ ");
    }

}
